Optimal. Leaf size=70 \[ \frac {A+B x}{a x \sqrt {a+b x^2}}-\frac {2 A \sqrt {a+b x^2}}{a^2 x}-\frac {B \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{a^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {837, 821, 272,
65, 214} \begin {gather*} -\frac {B \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{a^{3/2}}-\frac {2 A \sqrt {a+b x^2}}{a^2 x}+\frac {A+B x}{a x \sqrt {a+b x^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 214
Rule 272
Rule 821
Rule 837
Rubi steps
\begin {align*} \int \frac {A+B x}{x^2 \left (a+b x^2\right )^{3/2}} \, dx &=\frac {A+B x}{a x \sqrt {a+b x^2}}-\frac {\int \frac {-2 a A b-a b B x}{x^2 \sqrt {a+b x^2}} \, dx}{a^2 b}\\ &=\frac {A+B x}{a x \sqrt {a+b x^2}}-\frac {2 A \sqrt {a+b x^2}}{a^2 x}+\frac {B \int \frac {1}{x \sqrt {a+b x^2}} \, dx}{a}\\ &=\frac {A+B x}{a x \sqrt {a+b x^2}}-\frac {2 A \sqrt {a+b x^2}}{a^2 x}+\frac {B \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,x^2\right )}{2 a}\\ &=\frac {A+B x}{a x \sqrt {a+b x^2}}-\frac {2 A \sqrt {a+b x^2}}{a^2 x}+\frac {B \text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b x^2}\right )}{a b}\\ &=\frac {A+B x}{a x \sqrt {a+b x^2}}-\frac {2 A \sqrt {a+b x^2}}{a^2 x}-\frac {B \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{a^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.23, size = 71, normalized size = 1.01 \begin {gather*} \frac {-a A+a B x-2 A b x^2}{a^2 x \sqrt {a+b x^2}}+\frac {2 B \tanh ^{-1}\left (\frac {\sqrt {b} x-\sqrt {a+b x^2}}{\sqrt {a}}\right )}{a^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 82, normalized size = 1.17
method | result | size |
risch | \(-\frac {A \sqrt {b \,x^{2}+a}}{a^{2} x}-\frac {A b x}{a^{2} \sqrt {b \,x^{2}+a}}+\frac {B}{a \sqrt {b \,x^{2}+a}}-\frac {\ln \left (\frac {2 a +2 \sqrt {a}\, \sqrt {b \,x^{2}+a}}{x}\right ) B}{a^{\frac {3}{2}}}\) | \(80\) |
default | \(B \left (\frac {1}{a \sqrt {b \,x^{2}+a}}-\frac {\ln \left (\frac {2 a +2 \sqrt {a}\, \sqrt {b \,x^{2}+a}}{x}\right )}{a^{\frac {3}{2}}}\right )+A \left (-\frac {1}{a x \sqrt {b \,x^{2}+a}}-\frac {2 b x}{a^{2} \sqrt {b \,x^{2}+a}}\right )\) | \(82\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 68, normalized size = 0.97 \begin {gather*} -\frac {2 \, A b x}{\sqrt {b x^{2} + a} a^{2}} - \frac {B \operatorname {arsinh}\left (\frac {a}{\sqrt {a b} {\left | x \right |}}\right )}{a^{\frac {3}{2}}} + \frac {B}{\sqrt {b x^{2} + a} a} - \frac {A}{\sqrt {b x^{2} + a} a x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.52, size = 169, normalized size = 2.41 \begin {gather*} \left [\frac {{\left (B b x^{3} + B a x\right )} \sqrt {a} \log \left (-\frac {b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right ) - 2 \, {\left (2 \, A b x^{2} - B a x + A a\right )} \sqrt {b x^{2} + a}}{2 \, {\left (a^{2} b x^{3} + a^{3} x\right )}}, \frac {{\left (B b x^{3} + B a x\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {-a}}{\sqrt {b x^{2} + a}}\right ) - {\left (2 \, A b x^{2} - B a x + A a\right )} \sqrt {b x^{2} + a}}{a^{2} b x^{3} + a^{3} x}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 235 vs.
\(2 (60) = 120\).
time = 5.22, size = 235, normalized size = 3.36 \begin {gather*} A \left (- \frac {1}{a \sqrt {b} x^{2} \sqrt {\frac {a}{b x^{2}} + 1}} - \frac {2 \sqrt {b}}{a^{2} \sqrt {\frac {a}{b x^{2}} + 1}}\right ) + B \left (\frac {2 a^{3} \sqrt {1 + \frac {b x^{2}}{a}}}{2 a^{\frac {9}{2}} + 2 a^{\frac {7}{2}} b x^{2}} + \frac {a^{3} \log {\left (\frac {b x^{2}}{a} \right )}}{2 a^{\frac {9}{2}} + 2 a^{\frac {7}{2}} b x^{2}} - \frac {2 a^{3} \log {\left (\sqrt {1 + \frac {b x^{2}}{a}} + 1 \right )}}{2 a^{\frac {9}{2}} + 2 a^{\frac {7}{2}} b x^{2}} + \frac {a^{2} b x^{2} \log {\left (\frac {b x^{2}}{a} \right )}}{2 a^{\frac {9}{2}} + 2 a^{\frac {7}{2}} b x^{2}} - \frac {2 a^{2} b x^{2} \log {\left (\sqrt {1 + \frac {b x^{2}}{a}} + 1 \right )}}{2 a^{\frac {9}{2}} + 2 a^{\frac {7}{2}} b x^{2}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.71, size = 96, normalized size = 1.37 \begin {gather*} -\frac {\frac {A b x}{a^{2}} - \frac {B}{a}}{\sqrt {b x^{2} + a}} + \frac {2 \, B \arctan \left (-\frac {\sqrt {b} x - \sqrt {b x^{2} + a}}{\sqrt {-a}}\right )}{\sqrt {-a} a} + \frac {2 \, A \sqrt {b}}{{\left ({\left (\sqrt {b} x - \sqrt {b x^{2} + a}\right )}^{2} - a\right )} a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.45, size = 70, normalized size = 1.00 \begin {gather*} \frac {B}{a\,\sqrt {b\,x^2+a}}-\frac {B\,\mathrm {atanh}\left (\frac {\sqrt {b\,x^2+a}}{\sqrt {a}}\right )}{a^{3/2}}-\frac {A}{a\,x\,\sqrt {b\,x^2+a}}-\frac {2\,A\,b\,x}{a^2\,\sqrt {b\,x^2+a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________